package com.csweimei.rentmanagementtreasure.pop;

import android.content.Context;
import android.content.Intent;
import android.widget.ImageView;
import android.widget.LinearLayout;

import androidx.annotation.NonNull;

import com.csweimei.rentmanagementtreasure.R;
import com.csweimei.rentmanagementtreasure.tenant.ui.act.CustomActivity;
import com.csweimei.rentmanagementtreasure.tenant.ui.act.FollowHouseActivity;
import com.csweimei.rentmanagementtreasure.tenant.ui.act.customer.AddCustomerActivity;
import com.csweimei.rentmanagementtreasure.tenant.ui.act.customer.AddFollowKHActivity;
import com.csweimei.rentmanagementtreasure.tenant.ui.act.house.AddHouseHzActivity;
import com.csweimei.rentmanagementtreasure.tenant.ui.act.house.AddHouseZzActivity;
import com.lxj.xpopup.core.BottomPopupView;

public class PopSchedule extends BottomPopupView {
    private Context mContext;


    private LinearLayout addZz,addHz,addKh;


    public PopSchedule(@NonNull Context context) {
        super(context);
        this.mContext = context;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.pop_schedule;
    }

    @Override
    protected void onCreate() {
        addZz = findViewById(R.id.schedule_fd);
        addHz = findViewById(R.id.schedule_follow);
        addKh = findViewById(R.id.schedule_cus);
        ImageView cancel = findViewById(R.id.pop_close);
        cancel.setOnClickListener(view -> dismiss());


        addZz.setOnClickListener(v -> {
            mContext.startActivity(new Intent(mContext, FollowHouseActivity.class));
            dismiss();

        });

        addHz.setOnClickListener(v -> {
            mContext.startActivity(new Intent(mContext, AddFollowKHActivity.class));
            dismiss();
        });

        addKh.setOnClickListener(v -> {
            mContext.startActivity(new Intent(mContext, CustomActivity.class));
            dismiss();
        });


    }

}
